package com.haoshui.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
     PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    COMMENT_NOT_NOLL(506,"评论内容是空" ),
    IMG_TYPE_ERRORR(507, "文件类型错误，必须是png或者jpg"),
    NICKNAME_EXIST(508, "用户昵称已存在"),
    LOGOUT_FAIL(509,"用户注销失败" ),
    INSERT_FAILED(510,"插入数据失败" ),
    DELETE_FAILED(510, "删除失败"),
    UPDATE_FAILED(511, "更新数据失败"),
    MENU_PARENT_EQ_SELF(512, "菜单父目录不能是自己"),
    MENU_HAS_CHILDREN(513, "不能删除有子菜单的菜单"),
    IMG_OVER_LIMIT(514, "图片大小超过10M，选择一张符合条件的吧" );
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}